<extend name="desktop_default/template/base_index" />
<block name="area_header">
    <link rel="stylesheet" href="__CSS__/zengwuxian/style.css">
    <script type="text/javascript" src="__JS__/mengwu.js"></script>
</block>

<block name="area_top">
    <include file="desktop_default/template/user_bar" />
    <include file="desktop_default/template/shcart_bar" />
    <include file="desktop_default/template/nav_bar" />
</block>

<block name="area_content">
    <div class="zxw-list main2-content">
        <div class="zxw-top">
            <div class="zxw-top-left">
                <volist name="cate" id="vo">
                    <div class="zxw-top-left-menu">
                        <ul>
                            <li>{$vo.name}</li>
                            <volist name="vo.child" id="vo2">
                                <li>{$vo2.name}</li>
                            </volist>
                        </ul>
                        <div class="zxw-top-left-menu-float">
                            <volist name="vo.child" id="vo2">
                                <div class="zxw-top-left-menu-float-item">
                                    <div class="zxw-top-left-menu-float-item-title">{$vo2.name}</div>
                                    <div class="zxw-top-left-menu-float-item-content">
                                        <ul>
                                            <notempty name="vo2.child">
                                                <volist name="vo2.child" id="vo3">
                                                    <li><a href="{:U('mengwu/zengwuxian/index',array('cate'=>$vo3['id']))}">{$vo3.name}</a></li>
                                                </volist>
                                                <else />
                                                <li><a href="{:U('mengwu/zengwuxian/index',array('cate'=>$vo2['id']))}">{$vo2.name}</a></li>
                                            </notempty>

                                        </ul>
                                    </div>
                                </div>
                            </volist>
                        </div>
                    </div>
                </volist>
            </div>
            <div  class="zxw-top-middle">
                <img src="__IMG__/zengwuxian/banner.jpg" width="560px" height="280px">
            </div>
            <div  class="zxw-top-right">
                <a href="javascript:void(0);" style="width: 100%; height: 100%; position: absolute; z-index: 1;" onclick="popTip()"></a>
                <div class="zxw-top-right-top">
                    <span>发布赠送</span><img src="__IMG__/zengwuxian/arrow-r.png" width="6px" height="12px" style="margin-left: 3px"><br>
                    宝妈们都在赠送，快去吧
                </div>
                <div class="zxw-top-right-bottom">
                    <img src="__IMG__/zengwuxian/app.png" width="190px" height="134px">
                </div>
            </div>
            <div class="clear"></div>
        </div>
        <div id="tip-wrap" class="tip-wrap">
            <div class="tip-box">
                <a class="close" href="javascript:void(0);" title="关闭"></a>
                <div class="qrocode"><img src=""></div>
            </div>
        </div>
        <div class="zxw-order">
            <dl>
                <dt>排序：</dt>
                <dd>
                    <if condition="I('order',19) eq 10">
                        <a class="btn btn-order selected" href="javascript:void(0);">综合</a>
                        <else/>
                        <a class="btn btn-order" href="{:U('mengwu/zengwuxian/index',array('cate'=>I('cate',0),'order'=>10))}">综合</a>
                    </if>
                </dd>
                <dd>
                    <if condition="I('order',19) eq 18">
                        <a class="btn btn-order selected" href="javascript:void(0);">人气</a>
                        <else/>
                        <a class="btn btn-order" href="{:U('mengwu/zengwuxian/index',array('cate'=>I('cate',0),'order'=>18))}">人气</a>
                    </if>
                </dd>
                <dd>
                    <if condition="I('order',19) eq 19">
                        <a class="btn btn-order selected" href="javascript:void(0);">新品</a>
                        <else/>
                        <a class="btn btn-order" href="{:U('mengwu/zengwuxian/index',array('cate'=>I('cate',0),'order'=>19))}">新品</a>
                    </if>
                </dd>
            </dl>
        </div>

        <notempty name="list">
            <volist name="list" id="vo">
                <div class="zwx-item">
                    <a class="a-btn" href="javascript:void(0);"></a>
                    <div class="zwx-item-top">
                        <div class="zwx-item-top-head"><img src="{$vo.head}"></div>
                        <div class="zwx-item-top-name">{$vo.nickname|default="未知昵称"}</div>
                        <div class="zwx-item-top-collect"><img src="__IMG__/zengwuxian/like.png" width="20px" height="20px">{$vo.applies}</div>
                    </div>
                    <div  class="zwx-item-pic">
                        <div class="zwx-item-pic-main"><img src="{$vo.main_img}"></div>
                        <eq name="vo.send_out" value="1">
                            <div class="zwx-item-pic-out"><img src="__IMG__/zengwuxian/over.png" width="90px" height="90px"><br>已赠出</div>
                        </eq>
                    </div>
                    <div  class="zwx-item-depict">
                        <div class="zwx-item-depict-top"><a href="#"><notempty name="vo.cate_name"><span>#{$vo.cate_name}#</span></notempty></a>{$vo.name}</div>
                        <div class="zwx-item-depict-bottom">
                            <div class="zwx-item-depict-bottom-time"><img src="__IMG__/zengwuxian/time.png" width="15px" height="15px">{$vo.date}</div>
                            <div class="zwx-item-depict-bottom-local" data-province="{$vo.loc_province}" data-city="{$vo.loc_city}"><img src="__IMG__/zengwuxian/pos.png" width="15px" height="15px"><span class="address"></span></span></spam></div>
                        </div>
                    </div>
                </div>
            </volist>
            <div class="clear"></div>
            {$show}
            <else />
            <div class="zxw-empty">当前没有任何赠品哦~~</div>
        </notempty>


    </div>
    <div class="bottom-line"></div>
</block>

<block name="area_footer">
    <include file="desktop_default/template/footer_ad" />
    <include file="desktop_default/template/footer_nav" />
    <include file="desktop_default/template/footer_bottom" />
</block>
<block name="area_js">
    <script type="text/javascript">
        $('.zwx-item-depict-bottom-local').each(function(){
            var p = $(this).attr('data-province');
            var c = $(this).attr('data-city');
            var a = mengwu.address_json;
            a = _.find(a, ['value' , p]);
            if(a){
                pt = a.label;
                var a = _.find(a.children, ['value' , c]);
                if(a) {
                    var ct = a.label;
                    $(this).find('.address').text(pt+ct);
                }
            }

        });
    </script>
    <script type="text/javascript">
        function popTip(){
            $('#tip-wrap').show();
            $('html').addClass('pop');
        }
        function closeTip(){
            $('#tip-wrap').hide();
            $('html').removeClass('pop');
        }
        $('#tip-wrap .close').click(closeTip);
        $('.zwx-item .a-btn').click(popTip);
    </script>
</block>